<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>密码找回</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/reg.css">
    <script type="text/javascript">
        function Check(){
            var pass1 = document.getElementById("password1").value;
            var pass2 = document.getElementById("password2").value;
            if (pass1 === "" || pass2 === "") {
                window.alert("请填写密码");
                return false;
            } else if (pass1 !== pass2) {
                alert("两次密码不正确");
                return false;
            }else{
                return true;
            }}
    </script>
</head>
<body>
<div id="container">
    <!--页面标题-->
    <h1>学生用户修改密码</h1>
    <!--水平线-->
    <hr/>
    <!--表单-->
    <form onsubmit="return Check()" method="post" action="${pageContext.request.contextPath}/user/forget-update">
        <label>用 户：
            <input type="text" style="background-color: transparent;border: 0;" name="name" value="${name}" readonly/>
        </label>
        <br/>
        <label>密 码：
            <input type="password" placeholder="请您输入新密码" name="password1" id="password1"  required/>
        </label>
        <br/>
        <label>确 认：
            <input type="password" placeholder="再输入用户密码" name="password2" id="password2"  required/>
        </label>
        <br/>
        <button type="submit">
            提交
        </button>
    </form>
</div>
</body>
</html>
